import React, { Component } from 'react'
import './Mine.less'
import Header from '../../components/Header';
import MineBanner from './MineBanner/MineBanner';
import { reqBanner } from '../../http/api';
export default class Mine extends Component {
    constructor() {
        super()
        this.state = {
            list: []
        }
    }
    componentDidMount() {
        reqBanner().then(res => {
            if (res.data.code === 200) {
                // 赋值
                this.setState({
                    list: res.data.list
                })
            }
        })
    }
    render() {
        let { list } = this.state
        return (
            <div>
                <Header title="我的" back></Header>
                <div>
                    {/* 轮播图 */}
                    <MineBanner list={list}></MineBanner>
                </div>
            </div>
        )
    }
}
